package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLString;
import HLLib.http.HLANetFile;

public class HLClassANetFile extends HLLibClass {
    public HLClassANetFile(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return null;
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                ((HLANetFile) self).IsRightUrl();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLANetFile) self).IsRightUrl());
            }
            break;
        }
        case 1: {
            ((HLANetFile) self).SetUrl((HLString)args.GetObject(0));
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLANetFile) self).IsLoadOver();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLANetFile) self).IsLoadOver());
            }
            break;
        }
        }
    }
}
